package actions;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.ActionSupport;

import controllers.AbstractController;


public class CreateRender extends ActionSupport {

	private static final long serialVersionUID = 1164809814839976523L;

	private static final Logger LOGGER = Logger.getLogger(CreateRender.class);

	
	// -------------------------------------------------------------
	// Objects
	// -------------------------------------------------------------

	AbstractController controller = new AbstractController();

	private String renderName;
	private String idModule;
	private String description;
	private String deadlineLimit;
	private String scale;
	
	private boolean result;
	
	
	// -------------------------------------------------------------
	// Methods
	// -------------------------------------------------------------

	public String execute() {
		setResult(controller.createRender(getRenderName(), Integer.parseInt(getIdModule()), getDescription(), getDeadlineLimit(), getScale()));
		return SUCCESS;
	}

	

	public boolean getResult() {
		return result;
	}


	public void setResult(boolean result) {
		this.result = result;
	}



	public String getRenderName() {
		return renderName;
	}



	public void setRenderName(String renderName) {
		this.renderName = renderName;
	}



	public String getIdModule() {
		return idModule;
	}



	public void setIdModule(String idModule) {
		this.idModule = idModule;
	}



	public String getDescription() {
		return description;
	}



	public void setDescription(String description) {
		this.description = description;
	}



	public String getDeadlineLimit() {
		return deadlineLimit;
	}



	public void setDeadlineLimit(String deadlineLimit) {
		this.deadlineLimit = deadlineLimit;
	}



	public String getScale() {
		return scale;
	}



	public void setScale(String scale) {
		this.scale = scale;
	}





}
